package my.test;

import java.lang.reflect.Method;

public class AnnotationMain {

	public static void main(String[] args) throws ClassNotFoundException, SecurityException, NoSuchMethodException{
		Class<?> cls = Class.forName("my.test.AnnotationTest");
		
		boolean flag = cls.isAnnotationPresent(Annotation.class);
		System.out.println(flag);	
		
		Method mtd = cls.getMethod("sayHello");
		

		System.out.println(mtd);
		System.out.println(mtd.isAnnotationPresent(Annotation2.class));
	}
}
